package com.cloud.cmt.cmtcontrol.controller;

import com.cloud.cmt.cmtcontrol.service.impl.UserServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * User: wcy
 * Date: 2017/9/5
 * Time: 15:45
 */
@RestController
@RequestMapping("/user")
@Api(value = "/用户信息接口", description = "用户信息增删查改等。。。。")
public class UserCtl {

    @Resource
    UserServiceImpl userService;

//    @PostMapping(value = "/getAll")
//    public PageInfo<UserInfo> getAll(@RequestBody UserInfo userInfo) {
//        PageHelper.startPage(userInfo);
//        List<UserInfo> userInfoList = userService.getAll();
//        userService.addUser(userInfo);
//        return new PageInfo<UserInfo>(userInfoList);
//    }
//
//    @ApiOperation(value = "获取信息", response = UserInfo.class)
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id", value = "用户id", dataType = "Integer")
//    })
//    @ApiResponses({@ApiResponse(code = 200, message = "success")})
//    @PostMapping(value = "/getUserInfo")
//    public PageInfo<UserInfo> getUserInfo(@RequestBody UserInfo userInfo) {
//        return userService.findByName(userInfo);
//    }
//
//    @ApiOperation(value = "获取信息", response = UserInfo.class)
//    @ApiResponses({@ApiResponse(code = 200, message = "success")})
//    @GetMapping(value = "/{id}")
//    public UserInfo get(@PathVariable("id") Long id) {
//        return (UserInfo) userService.selectByPrimaryKey(id);
//    }

}
